<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="StyleSheet" href="../css/jpetstore.css" type="text/css" media="screen"/>
</head>
<body>
<header th:replace="common/IncludeTop"></header>
<ul class="messages">
    <li>谢谢，您的账单已提交</li>
</ul>
<div id="BackLink">
    <a href="/account/main">返回主菜单</a>
</div>

<div id="Catalog">

    <table>
        <tbody>
        <tr>
            <th align="center" colspan="2" th:text="'Order '+${order.orderId}+${order.orderDate}">
                Order OrderID OrderDate
            </th>
        </tr>
        <tr>
            <th colspan="2">支付细节</th>
        </tr>
        <tr>
            <td>支付类型：</td>
            <td th:text="${order.cardType}">Order CardType</td>
        </tr>
        <tr>
            <td>银行卡号：</td>
            <td th:text="${order.creditCard}"> * Fake number!</td>
        </tr>
        <tr>
            <th colspan="2">账单地址信息：</th>
        </tr>
        <tr>
            <td>用户名称：</td>
            <td th:text="${order.billToName}">Order BillToName</td>
        </tr>
        <tr>
            <td>地址1：</td>
            <td th:text="${order.billAddress1}">Order Address1</td>
        </tr>
        <tr>
            <td>地址2：</td>
            <td th:text="${order.billAddress2}">Order Address2</td>
        </tr>
        <tr>
            <td>城市：</td>
            <td th:text="${order.billCity}">Order BillCity</td>
        </tr>
        <tr>
            <td>国家：</td>
            <td th:text="${order.billCountry}">Order BillCountry</td>
        </tr>
        <tr>
            <th colspan="2">邮寄地址信息：</th>
        </tr>
        <tr>
            <td>用户名称：</td>
            <td th:text="${order.shipToName}">Order ShipToName</td>
        </tr>
        <tr>
            <td>地址1：</td>
            <td th:text="${order.shipAddress1}">Order ShipAddress1</td>
        </tr>
        <tr>
            <td>地址2：</td>
            <td th:text="${order.shipAddress2}">Order ShipAddress2</td>
        </tr>
        <tr>
            <td>城市：</td>
            <td th:text="${order.shipCity}">Order ShipCity</td>
        </tr>
        <tr>
            <td>国家：</td>
            <td th:text="${order.shipCountry}">Order ShipCountry</td>
        </tr>
        <tr>
            <td colspan="2">
                <table>
                    <tbody>
                    <tr>
                        <th>Item ID</th>
                        <th>Description</th>
                        <th>Quantity</th>
                        <th>Price</th>
                        <th>Total Cost</th>
                    </tr>
                    <tr th:each="lineItem:${cart.getCartItemList()}">
                        <td><a th:href="'viewItem?itemId='+${lineItem.itemId}">LineItems ItemId</a></td>
                        <td th:if="${lineItem != null}" th:text="${lineItem.attribute} + ' ' + ${lineItem.name}">
                            LineItem Attribute And Name
                        </td>
                        <td th:if test="${lineItem == null}">
                            <i>库存为0</i>
                        </td>


                        <td th:text="${lineItem.quantity}">LineItem Quantity</td>
                        <td th:text="'$'+${#numbers.formatDecimal(lineItem.unitPrice,1,2)}">
                            LineItem UnitPrice
                        </td>
                        <td th:text="'$'+${#numbers.formatDecimal(lineItem.total,1,2)}">
                            LineItem Total
                        </td>
                    </tr>
                    <tr>
                        <th colspan="5" th:text="'总价'+${#numbers.formatDecimal(order.totalPrice,1,2)}">
                            总价： Order TotalPrice
                        </th>
                    </tr>
                    </tbody>
                </table>
            </td>
        </tr>

        </tbody>
    </table>

</div>
<footer th:replace="common/IncludeBottom"></footer>
</body>
</html>